Counters and exemplary applications

ABSTRACT

Embodiments described herein are related to a counter. In some embodiments, the counter can be used as a divider, e.g., in a fractional PLL. In some embodiments, the counter (e.g., the main counter or counter C) includes a first counter (e.g., counter C 1 ) and a second counter (e.g., counter C 2 ), which, together with the first counter C 1 , perform the counting function for counter C. For example, if counter C is to count to the value N, then counter C 1  counts, e.g., to N 1 , and counter C 2  counts to N 2  where N=N 1 +N 2 . For counter C 1  to count to N 1 , N 1  is loaded to counter C 1 . Similarly, for counter C 2  to count to N 2 , N 2  is loaded to counter C 2 . While counter C 1  counts (e.g., to N 1 ), N 2  can be loaded to counter C 2 . After counter C 1  finishes counting to N 1 , N 2 , if loaded, is available for counter C 2  to start counting to this N 2 . Counters C 1  and C 2  can alternately count and thus provide continuous counting for counter C. Other embodiments and exemplary applications are also disclosed.

CROSS-REFERENCES TO RELATED APPLICATIONS

The present application is based on, and claims priority from, U.S. Provisional No. 61/154,931 filed Feb. 24, 2009, the disclosure of which is hereby incorporated by reference herein in its entirety.

FIELD

The present disclosure relates to counters and methods of making them.

BACKGROUND

Dividers are frequently used in Phase Locked Loops (PLLs). In an approach, a sigma-delta modulator modulates dividers for fractional PLLs, i.e., PLLs that use a fractional value divider. Various dividers receive the clock signal from a Voltage-Controlled Oscillator (VCO) and count the clock pulses with various divider numbers at the same time. The sigma-delta modulator generates a new divider number whenever the current divider finishes counting. The new divider, e.g., through a multiplexer (MUX), selects the appropriate divider output to the phase detector. Because of the many dividers that operate at very high speeds at the same time, this approach generally consumes a significant amount of the power and layout area in a semiconductor chip in comparison with other components. Furthermore, since the various dividers have different divider numbers, the outputs of these dividers are asynchronous. As a result, when a number is selected through the MUX, glitches are easily generated and thus degrade the capabilities of the PLL.

In another approach, there is one divider for the PLL. Here, the sigma-delta modulator generates a new divider number whenever the divider finishes the current counting cycle. The divider then loads this new number into its corresponding counter before performing the next counting cycle. The divider, however, cannot miss any clock pulse from the VCO. For example, if the divider counts each clock pulse at the rising of the clock, the divider must load the new divider number before the falling edge of the clock. This approach does not work well at very high speeds, e.g., above 2 (gigahertz) GHz.

In a Wan & Brennan approach, there are N sub-divider cells. Each cell divides the clock either by two (2) or three (3), which is determined by an output of a value stored in a memory, e.g., a read-only memory (ROM). This output is then updated at the rising edge of the output clock from the sub-divider cell. This approach provides a divider number ranging from 3^(N) to 2^(N), wherein N is an integer, and can be used for high speed operation. However, this approach requires a ROM for each sub-divider cell and mapping control logic to control the output sequence of the ROM. This approach is complicated and also consumes a large layout area in comparison with other elements on the semiconductor chip.

SUMMARY

Some embodiments regard an electronic circuit comprising: an input clock and an output clock; a first counter configured to receive a first clock signal from the input clock and a first value N₁; to count to the first value N₁ based on the first clock signal; and to generate a first enable signal; and a second counter configured to receive a second clock signal from the input clock and a second value N₂; and to count to the second value N₂ based on the second clock signal; wherein the first enable signal enables the second counter to start counting after the first counter stops counting.

Some embodiments regard a frequency divider, comprising: an input clock signal and an output clock signal; a first counter to count to a first value N₁; a second counter to count to a second value N₂; wherein the second counter generates the output clock signal based on an activity signal of the second counter; the activity signal of the second counter changing a logic state after the second counter starts or stop counting; a frequency of the output clock signal being a frequency of the input clock signal divided by a value N, wherein N=N₁+N₂.

Some embodiments regard a method comprising providing a main counter having a first counter including a first enable signal; and a second counter; wherein the first counter counts to a value N₁ and the second counter counts to a value N₂ in response to a main counter being set to count to a value N wherein N=N₁+N₂; and the first enable signal enabling the second counter to start counting to the value N₂ after the first counter finishes counting to the value N₁.

Other embodiments and exemplary applications are also disclosed.

BRIEF DESCRIPTION OF THE DRAWINGS

The details of one or more embodiments of the invention are set forth in the accompanying drawings and the description below. Other features and characteristics of the invention will be apparent from the description, drawings, and claims.

FIG. 1 shows a counter in accordance with some embodiments described herein.

FIG. 2 shows signals illustrating operation of the counter in FIG. 1.

FIG. 3 shows a table illustrating how signal ACT₁ of FIG. 1 is generated.

FIG. 4 shows a table illustrating how signal ACT₂ of FIG. 2 is generated.

Like reference symbols in the various drawings indicate like elements.

DETAILED DESCRIPTION

In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of one or more embodiments of the present invention. It will be apparent, however, that the embodiments of the present invention can be practiced without these specific details. In other instances, well-known structures and devices are schematically shown in order to simplify the drawing. Embodiments, or examples, described herein and illustrated in the drawings are now being described using more detailed language. It will nevertheless be understood that no limitation of the scope of the invention is thereby intended. Any alterations and modifications in the described embodiments, and any further applications of principles of the invention described in this document are contemplated as would normally occur to one of ordinary skill in the art to which the invention relates. Reference numbers may be repeated throughout the embodiments, but this does not necessarily require that feature(s) of one embodiment apply to another embodiment, even if they share the same reference number.

Embodiments of the Counter or Frequency Divider

Embodiments described herein are related to a counter. In some embodiments, the counter is used as a divider, e.g., in a fractional PLL. In some embodiments, the counter (e.g., the main counter or counter C) includes a first counter (e.g., counter C₁) and a second counter (e.g., counter C₂), which together perform the counting function for counter C. For example, if counter C counts to the number N, then counter C₁ counts, e.g., to N₁, and counter C₂ counts to N₂, wherein N=N₁+N₂. For counter C₁ to count to N₁, N₁ is loaded to counter C₁. Similarly, for counter C₂ to count to N₂, N₂ is loaded to counter C₂. While counter C₁ counts (e.g., to N₁), N₂ can be loaded to counter C₂. After counter C₁ finishes counting to N₁, N₂, if loaded, is available for counter C₂ to start counting. Counters C₁ and C₂ can alternately count and thus provide continuous counting for counter C.

Some embodiments described herein have one or more of the following features and/or characteristics. In some embodiments, after counter C is used as a divider in a sigma-delta fractional N PLL, the divider/counter allows the PLL frequencies to have a higher resolution without sacrificing the bandwidth so that the output clock of the PLL switches from one frequency to another frequency more quickly than other approaches. In some embodiments, the feedback divider number is not fixed. Rather the feedback divider number is changeable, e.g., before counter C₁ completes the counting function. In some embodiments, the feedback divider path for the sigma-delta modulator is implemented with a single divider having a sufficiently wide timing margin for the PLL to be operated at high speed, e.g., above the 2 GHz range. Even operating at high speeds, some embodiments described herein generate an irregularity-free feedback clock. In some embodiments, by using two counters C₁ and C₂ in counter C, a first counter, e.g., counter C₁, counts (e.g., to N₁) while the second counter, e.g., counter C₂, loads (e.g., the value N₂). As a result, in some embodiments, the loading and counting processes are performed in different time frames thereby solving the strict timing requirement in the prior art approaches. In some embodiments, by using a single counter C, the high power consumption and large layout area requirements of other approaches, particularly for high speed operation, are reduced.

FIG. 1 shows a counter C, in accordance with some embodiments described herein. In various embodiments, the counter C functions as a divider used in a fractional Phase Locked Loop (PLL), and/or includes one or more pipeline counters, and/or is glitch-free. Counter C receives an input a clock signal CLK_IN and provides an output clock signal CLK_OUT. Because a counter is commonly used as a frequency divider, e.g., in a PLL, counter C can be called a divider. Furthermore, if counter C divides an integer having a value N, then it is be referred to as a divide-by-N divider. For example, if the frequencies of the input clock signal CLK_IN and output clock signal CLK_OUT are F_(IN) and F_(OUT), respectively, then F_(OUT)=F_(IN)/N.

In some embodiments, counter C includes a first counter C₁, a second counter C₂, a first AND gate A₁, a second AND gate A₂, a first inverter I₁, and a second inverter I₂. Counter C₁ and counter C₂ receive input a values, e.g., N₁ and N₂, respectively, wherein both N₁ and N₂ are integers which can be the same or different. Counter C₁ and counter C₂ together perform the counting function for counter C. For example, if counter C counts to N in a time period, e.g., T, then, in time period T, counter C₁ counts to N₁, e.g., in time period T₁, and counter C₂ counts to N₂, e.g., in time period T₂, wherein T=T₁+T₂ and N=N₁+N₂. The counting result of both counters C₁ and C₂ is then reflected in output clock signal CLK_OUT, resulting in F_(OUT)=F_(IN)/N. Embodiments described herein are flexible in selecting N₁ and N₂ such that N=N₁+N₂ because either N₁ or N₂ can be arbitrarily selected and the other is determined from the equation N=N₁+N₂. In other words, in some embodiments, N₁ is arbitrarily selected and N₂ is determined from N−N₁. For example, if N is 40, and N₁ is arbitrarily selected as 39, then N₂ is therefore 1 (=40−39). For another example, if N₁ is arbitrarily selected as 38, then N₂ is 2 (=40−38), and if N₁ is arbitrarily selected as 37 then N₂ is 3 (=40−37), etc. Because N can be changed by changing either N₁ or N₂ during counting by either C₂ or C₁, respectively, changing N can be called dynamically changing or changing “on the fly.”

In some embodiments, if N is dynamically changed while either counter C₁ or counter C₂ is counting, respectively, then either N₂ or N₁, respectively, is changed. Furthermore, in some embodiments, N₁ or N₂ is selected as close to N as possible so that more time is available for N to change. For example, if N₁ is first selected, and the initial value of N changes during the time T₁ that C₁ is counting, then N₁ can be selected to be as close to the initial value of N as possible so that N₂ can be changed, which causes N to change because N=N₁+N₂. In the above example, if N₁ is 39 while C₁ is counting from clock cycles 1 to 39 then N₂ can be changed from clock cycle 1 to clock cycle 39. If, e.g., N₁ is 38, then N₂ can be changed from clock cycle 1 to clock cycle 38, and if, e.g., N₁ is 37 then N₂ can be changed from clock cycle 1 to clock cycle 37, etc.

In some embodiments, counter C₁ starts counting when signal CK₁ is clocking, which occurs when enable signal EN₁ is activated (e.g., high). When activated, enable signal EN₁, through AND gate A₁, passes the input clock signal CLK_IN to signal CK₁. Enable signal EN₁ is provided by inverter I₂ after counter C₂ finishes counting to N₂. Counter C₁ provides an “activity” signal, e.g., signal ACT₁, to indicate whether counter C₁ is counting or not. For example, when counter C₁ is counting, it provides a high signal ACT₁ indicating that it is counting. Furthermore, after finishing counting to N₁, counter C₁ provides a low signal ACT₁ indicating that it has finished counting to N₁. Signal ACT₁, through inverter I₁, becomes an enable signal EN₂, which, together with AND gate A₂ provide the input clock signal CLK_IN to signal CK₂ that enables counter C₂ to start counting. For example, after finishing counting to N₁, counter C₁ provides a low to signal ACT₁. Inverter I₁ inverts the low signal ACT₁ to a high. That is, signal EN₂ is high. AND gate A₂, having CK₂ and EN₂ being high, passes clock signal CLK_IN to signal CK₂, which enables counter C₂ to start counting.

In various embodiments, during the time counter C₁ is counting, e.g., during time T₁, N₂ is loaded to counter C₂. For example, while counter C₁ is counting, signal ACT₁ is high making EN₂ low and thus signal/LD_N₂ low which enables loading of N₂ to counter C₂. Because counting and loading are separately performed in different time frames, some embodiments described herein eliminate the strict timing requirement in the prior art approach, e.g., where loading and counting are in the same clock cycle of the same clock. As a result, some embodiments can be used in high frequency, e.g., above the 2 GHz range, applications.

Similar to counter C₁, in some embodiments, counter C₂ starts counting when signal CK₂ is clocking, which occurs when enable signal EN₂ is activated (e.g., high). When activated, signal EN₂, through AND gate A₂, passes the input clock signal CLK_IN to signal CK₂. Enable signal EN₂ is provided by inverter I₂ after counter C₁ finishes counting to N₁. Furthermore, during the time counter C₂ is counting, e.g., during time T₂, N₁ is loaded to counter C₁. In the embodiment of FIG. 1, while counter C₂ is counting, signal ACT₂ is high making EN₁ low and thus signal/LD_N₁ low and therefore enabling the loading of N₁ to counter C₁.

In some embodiments, after counter C₂ finishes counting, e.g., to N₂, it provides a signal, e.g., activity signal ACT₂, indicating that it has finished counting. Signal ACT₂, through inverter I₂ becomes signal EN₁. Signal EN₁, via AND gate A₁, passes input clock signal CLK_IN to signal CK₁ that enables counter C₁ to start counting. For example, counter C₂, after finishing counting, provides a low to signal ACT₂. Inverter I₂ inverts the low of signal ACT₂ to a high. That is, signal EN₁ is high. AND gate A₁, having CLK_IN and EN₁ being high, passes input clock signal CLK_IN to signal CK₁.

In various embodiments described herein, counters C₁ and C₂ alternately count continuously, and using counter C in some embodiments, as a result, is referred to as pipeline counting. By delegating the counting function of the main counter C to two counters C₁ and C₂, the counting and loading processes are performed in different time frames, which eliminate the strict timing requirement when loading and counting are to be done in a same clock cycle. By using a single discrete counter, e.g., counter C, the higher power consumption and/or large layout areas required by various discrete counters is/are reduced.

In the above illustration, the digital logic of various signals, e.g., ACT₁, EN₁, ACT₂, EN₂, etc., at a particular level (e.g., low or high) are used for illustration purposes. The different levels can be a design choice, and the invention is not limited to a particular level, but is applicable to different levels of the signal, depending on the circumstances.

Exemplary Signals

FIG. 2 shows signals illustrating an operation of counter C, in accordance with some embodiments. For illustration purposes, counter C is to count to 5 (N=5) wherein counter C₁ is to count to 3 (N₁=3) and C₂ is to count to 2 (N₂=2). Because counter C is to count to 5, it, as explained above, can be called a divide-by-5 counter or a divide-by-5 divider. That is, F_(OUT)=F_(IN)/5. For illustration purposes, each counter C₁ and C₂ counts at a rising edge of the clock, e.g., clocks CLK_IN, CK₁, CK₂, etc. Embodiments of the invention, however, are not so limited. For example, counters C₁ and C₂ may count on a falling edge of the clock, etc.

Row 210 shows timing periods T₁ and T₂ when counter C₁ and counter C₂ are counting, respectively. Row 220 shows the counts, e.g., starting at 0, and counting from 1 to 5. Rows 230, 240, and 250 show clock signals CLK_IN, CK₁, and CK₂, respectively. Row 260 shows signal ACT₂ or output signal clock CLK_OUT. During time T₁, CK₁ is clocking, and counter C₁ is counting from 0 to 1, 2 and 3. Because counter C₂ is not counting during this time period T₁, CK₂ is not clocking (e.g., remains low) and ACT₂ is low. Because output clock CLK_OUT is signal ACT₂, signal CLK_OUT is low. During time T₂ that counter C₂ is counting (e.g., from 4 to 5), counter C₁ is not counting, CK₁ is not clocking, and signal ACT₂ is high. CLK_OUT is therefore high. As compared, the frequency F_(OUT) of CLK_OUT is five times less than the frequency F_(IN) of CLK_IN, i.e., F_(OUT)=F_(IN)/5.

Loading N₁, N₂ and Signals ACT₁, ACT₂

In some embodiments, for counter C₁ to count to N₁, a negative of N₁ (i.e., −N₁) is loaded to counter C₁. As a result, counter C₁ counts from −N₁ to 0 and stops counting, which is the same as counting from 0 to N₁. Furthermore, the carry bit associated with N₁, e.g., bit CA₁, for a register that stores N₁, is used to generate a signal ACT₁. Generally, when N₁ is negative, the carry bit CA₁ remains at the same logic level, e.g., a low. When N₁ changes from −1 to 0, the carry bit CA₁ changes from a low to a high. In some embodiments, the inverse of the carry bit CA₁ is used to form the signal ACT₁. As a result, during time T₁ when counter C₁ is counting, ACT₁ is high and is low after time T₁, e.g., during time T₂.

FIG. 3 shows a table 300 illustrating how the signal ACT₁ is generated. For illustration purposes, N₁ is counted (or increases) from −3 to 0. Rows 310, 320, and 330 show that N₁ is −3, −2, and −1, respectively. During this time, carry bit CA₁ is 0, and as a result, signal ACT₁ is 1. Row 340 shows that when N₁ is 0, carry bit CA₁ changes to a 1, and as a result, signal ACT₁, the inverse of signal CA₁, is 0.

Similarly, in some embodiments, for counter C₂ to count to N₂, the negative of N₂ (i.e., −N₂) is loaded to counter C₂. As a result, the counter C₂ counts from −N₂ to 0, and stops counting. Furthermore, the carry bit, e.g., bit CA₂, for the register that stores N₂ is used to generate a signal ACT₂. Generally, when N₂ is negative, the carry bit CA₂ remains at the same logic level, e.g., a low. When N₂ changes from −1 to 0, the carry bit CA₂ changes from 0 to 1. In some embodiments, similar to the carry bit CA₁ in some embodiment, the inverse of carry bit CA₂ is used to form signal ACT₂.

FIG. 4 shows a graph 400 illustrating how the signal ACT₂ is generated in some embodiments. For illustration purposes, N₂ is counted (or increases) from −2 to 0. Rows 410 and 420 show that N₂ is −2 and −1, respectively. During this time, carry bit CA₂ is 0, and as a result, signal ACT₂ is 1. Row 430 shows that when N₂ is 0, carry bit CA₂ changes to 1, and as a result, signal ACT₂, the inverse of signal CA₂, is 0.

In the above illustration N₁ and N₂ in FIGS. 3 and 4 are shown to be 6-bit wide for illustration purposes, embodiments of the invention are applicable to various widths for either N₁ or N₂.

Exemplary Applications

Among various other applications, embodiments described herein are used in fractional PLLs, because fractional PLLs frequently change the count value (e.g., N). For example, in a PLL that desires dividing by 40.2, the divider, e.g., divider (or counter) C in the embodiment of FIG. 1, divides 4 times by 40 and 1 time by 41. That is, for another example, in each time TT₁, TT₂, TT₃, and TT₄ counter C counts 40, and in time TT₅ counter C counts 41. As a result, on average of the five periods TT₁, TT₂, TT₃, TT₄, and TT₅, the divider divides by 40.2 (=(40+40+40+40+41)/5). As can be seen in this example, the PLL desires for the count N to be changed from 40 to 41 in period TT₄ to TT₅, embodiments described herein are used to accommodate the situation. For example, N₁ and N₂ are selected such that N to be 40 in periods TT₁, TT₂, TT₃, and TT₄, and 41 in period TT₅. As discussed above, various combinations of N₁ and N₂ are selectable in accordance with principles of the invention such that N is 40 or 41, and N is dynamically changed. In the above example, a sigma-delta modulator works in combination with embodiments described herein to provide N₁ and N₂ for N to equal, e.g., 40 or 41. For example, if the sigma-delta modulator calls for a sequence of divider numbers (e.g., 40, 40, 40, 40, and 41 as in the above example), these numbers are inputted to counter C for it to function accordingly. In this illustrative application, some embodiments described herein allow the PLL frequencies to have higher resolution without sacrificing the bandwidth so that the output clock of the PLL can switch from one frequency to another frequency more quickly. In some embodiments, the feed back divider number (e.g., N), as explained above is not fixed, but can be changed, and thus some embodiments enable design flexibilities. In some embodiments, the feedback divider path for the sigma-delta modulator, is implemented with a single divider (or counter C) and allows the PLL to operate at high speeds, which, in some embodiments, include frequencies in the 2-3 GHz range. Even operating at high speeds, some embodiments described herein generate a glitch-free feedback clock (e.g., clock signal CLK_OUT).

A number of embodiments of the invention have been described. It will nevertheless be understood that various variations and/or modifications may be made without departing from the spirit and scope of the invention.

Each claim of this document constitutes a separate embodiment, and embodiments that combine different claims and/or different embodiments are within scope of the invention and will be apparent to those skilled in the art after reviewing this disclosure. Accordingly, the scope of the invention should be determined with reference to the following claims, along with the full scope of equivalences to which such claims are entitled. 

1. A method comprising: providing a main counter having a first counter including a first enable signal; and a second counter; wherein the first counter counts to a value N₁ and the second counter counts to a value N₂ in response to a main counter being set to count to a value N wherein N=N₁+N₂; and the first enable signal enabling the second counter to start counting to the value N₂ after the first counter finishes counting to the value N₁.
 2. The method of claim 1 wherein the first enable signal changes a logic level when the first counter starts or stops counting.
 3. The method of claim 1 wherein the first enable signal is generated from a carry bit associated with the value N₁.
 4. The method of claim 1 wherein the first enable signal is generated from an activity signal.
 5. The method of claim 1 wherein the first counter counts the value N₁ by receiving a negative value of N₁.
 6. The method of claim 1 wherein the value N₂ is provided to the second counter while the first counter is counting.
 7. The method of claim 1 wherein the second counter includes a second enable signal to enable the first counter to start counting.
 8. The method of claim 7 wherein the second enable signal changes a logic level when the second counter starts or stops counting.
 9. The method of claim 7 wherein the second enable signal is generated from a carry bit associated with the value N₂.
 10. The method of claim 7 wherein the second enable signal is generated from an activity signal.
 11. The method of claim 1 wherein the second counter counts the value N₂ by receiving a negative value of N₂.
 12. The method of claim 1 wherein the main counter receives an input clock signal and provides an output clock signal wherein a frequency of the output clock signal is a frequency of the input clock signal being divided by the value N.
 13. An electronic circuit comprising: an input clock and an output clock; a first counter configured to receive a first clock signal from the input clock and a first value N₁; to count to the first value N₁ based on the first clock signal; and to generate a first enable signal; and a second counter configured to receive a second clock signal from the input clock and a second value N₂; and to count to the second value N₂ based on the second clock signal; wherein the first enable signal enables the second counter to start counting after the first counter stops counting.
 14. The circuit of claim 13 being a counter to count a value N wherein N=N₁+N₂.
 15. The circuit of claim 13 being a frequency divider wherein a frequency of the output clock is divided by a frequency of the input clock by a value N where N=N₁+N₂.
 16. The circuit of claim 13 wherein the first enable signal changes a logic state when the first counter starts or stops counting the value N₁.
 17. The circuit of claim 13 wherein the first counter is loaded with a value −N₁; the first counter counts from −N₁ to 0; and the first enable signal changes a logic state when the value N₁ reaches
 0. 18. The circuit of claim 13 wherein the first enable signal changes a logic state based on a status of a carry signal associated with the first value N₁.
 19. The circuit of claim 13 wherein the first enable signal is generated based on an activity signal of the first counter that changes a logic state when the first counter starts or stops counting.
 20. The circuit of claim 13 wherein the second value N₂ is loaded based on a logic state of the first enable signal.
 21. The circuit of claim 13 wherein the second counter provides the output clock signal being an activity signal of the second counter.
 22. The circuit of claim 21 wherein the activity signal of the second counter changes a logic state when the second counter starts or stops counting.
 23. The circuit of claim 13 wherein the second counter is further configured to provide a second enable signal that enables the first counter to start counting after the second counter stops counting.
 24. A frequency divider, comprising: an input clock signal and an output clock signal; a first counter to count to a first value N₁; a second counter to count to a second value N₂; wherein the second counter generates the output clock signal based on an activity signal of the second counter; the activity signal of the second counter changing a logic state after the second counter starts or stop counting; a frequency of the output clock signal being a frequency of the input clock signal divided by a value N, wherein N=N₁+N₂.
 25. The divider of claim 24 wherein the second counter provides the activity signal based on a carry signal associated with the value N₂.
 26. The divider of claim 24 wherein the first counter comprises an enable signal enabling the second counter to start counting.
 27. The divider of claim 24 wherein the enable signal changes a logic state when the first counter starts or stops counting. 